home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / graphics / qrt.lzh / HEADER.H < prev    next >
C/C++ Source or Header  |  1989-02-16  |  3KB  |  152 lines

  1. #include "qrt.h"
  2. #include "pattern.h"
  3.  
  4.  
  5. /**********************************************************
  6.  
  7.    Contains actual instantiations of some variables, such
  8.    as the world, and the object data structure array.
  9.  
  10.  **********************************************************/
  11.  
  12.  
  13. WORLD THEWORLD;      /* THE WORLD in the mind of a computer */
  14. DEF     def;         /* defaults */
  15. int     linenumber;  /* line counter */
  16.  
  17.  
  18. /**********************************************************
  19.  
  20.    Table of pointers to functions for objects. There are
  21.    six functions per object (see qrt.h)
  22.  
  23.  **********************************************************/
  24.  
  25. int LineSphere(), SphereNorm(), BboxSphere(),
  26.     LineParallelogram(), PlaneNorm(), BboxParallelogram(),
  27.     LineBbox(), BboxBbox(), LineRing(), BboxRing(),
  28.     Plane_Pos(), Sphere_Pos(), LineQuadratic(),
  29.     QuadraticNorm(), BboxQuadratic(), Quadratic_Pos(),
  30.     PreCompPlane(), PreCompSphere(), PreCompQuadratic(),
  31.     PreCompNull(), Standard_Offset(), Offset_Bbox(),
  32.     LineTriangle(), BboxTriangle(), Resize_Bbox(),
  33.     Resize_Sphere(), Resize_Plane(), Resize_Quadratic(),
  34.     Err();
  35.  
  36. OBJ_DATA ObjData[] = {
  37.   { Err,                 /* nothing       */
  38.     Err,
  39.     Err,
  40.     Err,
  41.     PreCompNull,
  42.     Err,
  43.     Err },
  44.  
  45.   { Err,                 /* LINE          */
  46.     Err,
  47.     Err,
  48.     Err,
  49.     PreCompNull,
  50.     Err,
  51.     Err },
  52.  
  53.   { LineSphere,          /* SPHERE        */
  54.     SphereNorm,
  55.     BboxSphere,
  56.     Sphere_Pos,
  57.     PreCompSphere,
  58.     Standard_Offset,
  59.     Resize_Sphere },
  60.  
  61.   { LineParallelogram,   /* PARALLELOGRAM */
  62.     PlaneNorm,
  63.     BboxParallelogram,
  64.     Plane_Pos,
  65.     PreCompPlane,
  66.     Standard_Offset,
  67.     Resize_Plane },
  68.  
  69.   { LineTriangle,        /* TRIANGLE      */
  70.     PlaneNorm,
  71.     BboxTriangle,
  72.     Plane_Pos,
  73.     PreCompPlane,
  74.     Standard_Offset,
  75.     Resize_Plane },
  76.  
  77.   { LineSphere,          /* LAMP          */
  78.     SphereNorm,
  79.     BboxSphere,
  80.     Err,
  81.     PreCompNull,
  82.     Err,
  83.     Err },
  84.  
  85.   { Err,                 /* OBSERVER      */
  86.     Err,
  87.     Err,
  88.     Err,
  89.     PreCompNull,
  90.     Err,
  91.     Err },
  92.  
  93.   { Err,                 /* GROUND        */
  94.     Err,
  95.     Err,
  96.     Err,
  97.     PreCompNull,
  98.     Err,
  99.     Err },
  100.  
  101.   { Err,                 /* SKY           */
  102.     Err,
  103.     Err,
  104.     Err,
  105.     PreCompNull,
  106.     Err,
  107.     Err },
  108.  
  109.   { LineBbox,            /* BBOX          */
  110.     Err,
  111.     BboxBbox,
  112.     Err,
  113.     PreCompNull,
  114.     Offset_Bbox,
  115.     Resize_Bbox },
  116.  
  117.   { LineRing,            /* RING          */
  118.     PlaneNorm,
  119.     BboxRing,
  120.     Plane_Pos,
  121.     PreCompPlane,
  122.     Standard_Offset,
  123.     Resize_Plane },
  124.  
  125.   { LineQuadratic,       /* QUADRATIC     */
  126.     QuadraticNorm,
  127.     BboxQuadratic,
  128.     Quadratic_Pos,
  129.     PreCompQuadratic,
  130.     Standard_Offset,
  131.     Resize_Quadratic }
  132. };
  133.  
  134.  
  135. /**********************************************************
  136.  
  137.    Table of pointers to functions for patterns.
  138.    (see pattern.h)
  139.  
  140.  **********************************************************/
  141.  
  142. int Rect_Hit(), Circle_Hit(), Poly_Hit();
  143.  
  144. PATT_DATA PattData[] = {
  145.   { Err             },
  146.   { Rect_Hit        },
  147.   { Circle_Hit      },
  148.   { Poly_Hit        }
  149. };
  150.  
  151.  
  152.